#ifndef ENGINE_SYNAPTIC_SOUND_H
#define ENGINE_SYNAPTIC_SOUND_H


#include <map>
#include <string>
#include "SDL_mixer.h"
#include "SDL.h"

namespace Engine {

namespace Synaptic {

//Internally implements and represents audio chunks/buffer.
class Sound {
  private:
	static bool initialized; // Tells if the Sound system is initialized
	static std::map<std::string, Mix_Chunk *> soundMap; 

  public:
	static bool loadSound(std::string name) throw(const char *); // Load a sound into memmory
	static Sint16 play(std::string name, int loops = 0); // Try to play a audio chunk. Returns the channel number
	static bool stop(Sint16 channel); // Stop playing an audio channel
};

} // namespace Engine::Synaptic

} // namespace Engine
#endif
